#ifndef PACKETHEADER_HPP
#define PACKETHEADER_HPP

#include <boost/cstdint.hpp>
#include <boost/utility.hpp>

namespace kieper {
class PacketHeader {
public:
    PacketHeader();
    PacketHeader(uint16_t protocol, uint16_t messageType, uint32_t packetId);
    PacketHeader(unsigned char* array);
    ~PacketHeader();
    void toArray(unsigned char* array) const;
    void fromArray(const unsigned char* array);
    uint16_t protocol();
    uint16_t messageType();
    uint32_t packetId();
    /**
     * Header size in bytes
     */
    static const size_t HEADER_SIZE = 4;
protected:
private:
    uint16_t protocol_;
    uint16_t messageType_;
    uint32_t packetId_;
};
}

#endif
